//
//  ViewController.m
//  Calendar
//
//  Created by dllo on 16/3/11.
//  Copyright © 2016年 李晓丹. All rights reserved.
//

#import "ViewController.h"
#import "SZCalendarPicker.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    // 创建一个日历选择器，添加在self.view上
    SZCalendarPicker *calendarPicker = [SZCalendarPicker showOnView:self.view];
    // 算出今天的日期
    calendarPicker.today = [NSDate date];
    calendarPicker.date = calendarPicker.today;
    // 给定日历的大小
    calendarPicker.frame = CGRectMake(0, 100, self.view.frame.size.width, 400);
    calendarPicker.calendarBlock = ^(NSInteger day, NSInteger month, NSInteger year) {
        NSLog(@"%li-%li-%li", year, month, day);
    };
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
